package com.lz.yz.order.enumeration;

public enum TurnoversType {

    QUESTIONBUFF("赋能","QUESTIONBUFF", 1),
    REWARD("找大咖","REWARD", 2),
    FLAT("平摊","FLAT", 3),
    CROWDFUNDING("众筹","CROWDFUNDING", 4),
    GET("10元GET","GET", 5),
    DIVIDENDS("分红","DIVIDENDS", 6),
    WITHDRAW("提现","WITHDRAW", 7),
    INTEGRAL("积分","INTEGRAL", 8);


    private String type;
    private String str;
    private Integer typeValue;

    public String getStr() {
        return str;
    }

    public void setStr(String str) {
        this.str = str;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Integer getTypeValue() {
        return typeValue;
    }

    public void setTypeValue(Integer typeValue) {
        this.typeValue = typeValue;
    }

    TurnoversType(String type, String str, Integer typeValue) {
        this.type = type;
        this.str = str;
        this.typeValue = typeValue;
    }

    public static TurnoversType getTurnoversTypeByIndex(int index) {
        for (TurnoversType c : TurnoversType.values()) {
            if (c.getTypeValue() == index) {
                return c;
            }
        }
        return null;
    }
}
